<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkMemberAuthorityQueryRequest extends Request
{
    /**
     * 查询是否绑定备案
     * @var string
     */
    private $type = 'pdd.ddk.member.authority.query';

    /**
     * 自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key
     * @var
     */
    private $customParameters;

    /**
     * 推广位ID
     * @var
     */
    private $pid;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setCustomParameters($customParameters)
    {
        $this->customParameters = $customParameters;
    }

    public function getCustomParameters()
    {
        return $this->customParameters;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }

    public function getParams()
    {
        $params = [
            'type'              => $this->type,
            'custom_parameters' => $this->customParameters,
            'pid'               => $this->pid,
        ];
        return array_filter($params);
    }
}
